# 九九乘法表
i = 1
m = 2
while m <= 10:
    for n in range(1, m):
        print('{}*{}={:<2}'.format(n, i, n * i), end='  ')
    print()
    m += 1
    i += 1
print('=' * 70)

# 九九乘法表
i = 9
m = 10
while m >= 1:
    for n in range(1, m):
        print('{}*{}={:<2}'.format(n, i, n * i), end='  ')
    print()
    m -= 1
    i -= 1
print('=' * 70)

# 九九乘法表
i = 1
while i < 10:
    print(end='        ' * (9 - i))
    for n in range(i, 0, -1):
        print('{}*{}={:<2}'.format(n, i, n * i), end='  ')
    print()
    i += 1
print('=' * 70)

# 九九乘法表
i = 9
while i >= 1:
    print(end='        ' * (9 - i))
    for n in range(i, 0, -1):
        print('{}*{}={:<2}'.format(n, i, n * i), end='  ')
    print()
    i -= 1

# for row in range(1,10):
#     for col in range(1,row+1):
#         print('{}*{}={:<4}'.format(row,col,row*col),end=' ')
#     print('')

# print('='*60)

# for row in range(9,0,-1):
#     for col in range(1,row+1):
#         print('{}*{}={:<4}'.format(row,col,row*col),end=' ')
#     print('')
